<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
	h1{
			text-align: center;
	}

</style>
</head>
<body>

<H1>订单详情</H1>

<table>
		<tr>
				<c:forEach items="${requestScope.orders }" var="order" begin="0" end="1">
					<c:set value="${order.sumPrice }" var="sumPrice"></c:set>
					<td>订单编号：
							
									${order.id }
							
					
					</td>					
					<td>订单状态：${order.code.state}</td>	
					<td>订单创建时间：<fmt:formatDate value="${order.createtime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>		
					
				</c:forEach>
		</tr>
		<TR>
				<td colspan="3">
						<table>
					
							<c:forEach items="${requestScope.orders }" var="order">
								<tr>
										<td>${order.orderInfo.bookInfo.goodsName}</td>	
										<td><img width="100px" src="${pageContext.request.contextPath }${order.orderInfo.bookInfo.defaultPicUrl}">	
										<td>${order.orderInfo.bookInfo.cost }</td>		
										<td>${order.orderInfo.bookInfo.stock }</td>					
								<tr>
							</c:forEach>
							
						</table>
				</td>
		</TR>
		<tr>
				<td colspan="3">
						设置收货地址：<select>
									<c:forEach items="${requestScope.addressList }" var="addressList">
				
												<option value="${addressList.id}">${addressList.address} + ${addressList.addName}</option>
											
									</c:forEach>
								</select>
						付款金额:${sumPrice}元
				</td>
		</tr>

</table>

</body>
</html>